package com.ithuameng.admin.app.system.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 用户和角色
 *
 * @author ithuameng
 */
@Data
@TableName("t_user_role")
@EqualsAndHashCode(callSuper = false)
public class UserRole extends BaseId<Long> {

    private static final long serialVersionUID = 7461526262388241451L;

    public static final String USER_ID = "user_id";

    public static final String ROLE_ID = "role_id";

    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 用户编号
     */
    private Long userId;

    /**
     * 角色编号
     */
    private Long roleId;

    public UserRole() {
        super();
    }

    public UserRole(Long userId, Long roleId) {
        super();
        this.userId = userId;
        this.roleId = roleId;
    }
}
